#pragma once
#include <vector>
#include <cstdint>
#include <deque>
#include "data_seq.h"

namespace eintik::data::scan {

struct CScan
{
    CScan();
    void set_gate(int id) { id_gate = id; }

    void add_frame(const std::vector<int16_t> &frame, int64_t tick);
    std::vector<uint8_t> frame_c(int w, int pad4);
    std::pair<double, double> range();

private:
    std::deque<PosFrame> dq;
    std::deque<PosFrame> dq_prev;
    int64_t tick_head = -1;
    int id_gate = 0;
};

}
